package org.crl.blogsystem.entity.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.time.LocalDate;
import java.util.Date;
import java.util.Set;

@Data
public class UserDTO {
    private Long id;
    private String phone;
    private String username;
    private String avatar;
    private String signature;
    private Date createdAt;
    private String password;
    private String birth_day;
    private String sex;
    // 关注相关
    private Integer followCount;      // 关注数
    private Integer followerCount;    // 粉丝数
    private Boolean isFollowing;      // 当前登录用户是否关注此用户

    public UserDTO() {
    }

    public UserDTO(Long id, String phone, String username, String avatar, String signature, Date createdAt, String password, String birth_day, String sex) {
        this.id = id;
        this.phone = phone;
        this.username = username;
        this.avatar = avatar;
        this.signature = signature;
        this.createdAt = createdAt;
        this.password = password;
        this.birth_day = birth_day;
        this.sex = sex;
    }
}
